package com.ruoyi.question.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 错题管理对象 dt_wrong_question
 *
 * @author llc
 * @date 2025-01-07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DtWrongQuestion extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 错题ID
     */
    private Long id;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private Long userId;

    /**
     * 题目ID
     */
    @Excel(name = "题目ID")
    private Long questionId;

    /**
     * 逻辑删除(0-未删除,1-已删除)
     */
    @Excel(name = "逻辑删除(0-未删除,1-已删除)")
    private Integer isDeleted;

    /**
     * 题目详情
     */
    @Excel(name = "题目详情")
    private DtQuestion dtQuestion;

    /**
     * 用户详情
     */
    @Excel(name = "用户详情")
    private SysUser sysUser;

    /**
     * 查询参数：用户名
     */
    @Excel(name = "用户名")
    private String nickName;

    /**
     * 查询参数：题目内容
     */
    @Excel(name = "题目内容")
    private String title;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("questionId", getQuestionId())
                .append("isDeleted", getIsDeleted())
                .toString();
    }
}
